package org.example.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.example.entity.PsyAss;
import org.example.mapper.PsyAssMapper;
import org.example.service.PsyAssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName PsyAssServiceImpl
 * @Description TODO
 * @Author lipeijin
 * @Date 2025年08月14日 下午3:13
 * @Version 1.0
 */
@Service
public class PsyAssServiceImpl implements PsyAssService {
    @Autowired
    private PsyAssMapper psyAssMapper;

    @Override
    public PageInfo<PsyAss> getPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<PsyAss> psyAsses = psyAssMapper.getPage();
        PageInfo<PsyAss> pageInfo = new PageInfo<>(psyAsses);
        return pageInfo;
    }

    @Override
    public PageInfo<PsyAss> selectPageName(PsyAss psyAss, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<PsyAss> psyAsses = psyAssMapper.selectPageName(psyAss);
        PageInfo<PsyAss> aa=new PageInfo<>(psyAsses);
        return aa;

    }
}
